<?php
/**
 * Created by PhpStorm.
 * User: hgq
 * Date: 16/6/24
 * Time: 下午1:23
 */
?>

<div class="table-responsive">
    <table id="goodslisttable" class="table table-bordered table-hover table-condensed" style=" margin-top: 5px">
        <thead class="nowrap">
        <tr>
            <th style="width:30%">商品编码</th>
            <th style="width:50%">商品名称</th>
            <th style="width:10%">商品品牌</th>
            <th style="width:10%">是否可见</th>
        </tr>
        </thead>
        <tbody>
        <?php
        if ($goodslist != null && count($goodslist) > 0) {
            for ($i = 0; $i < count($goodslist); $i++) {
                ?>
                <tr>
                    <td><?= $goodslist[$i]['code'] ?></td>
                    <td><?= $goodslist[$i]['name'] ?></td>
                    <td><?= $goodslist[$i]['brand'] ?></td>
                    <td align="center">
                        <input type="checkbox" name="checkbox_is_hide" value="<?= $goodslist[$i]['code'] ?>" onclick="goodsHideSet('<?= $goodslist[$i]['code'] ?>')" <?php if ($goodslist[$i]["is_hide"] == 1) echo "checked=\"true\""; ?>>
                    </td>

                </tr>
                <?php
            }
        }
        ?>
        </tbody>
    </table>
</div>